package com.heima.feigns;

import com.heima.feigns.fallback.BehaviorFeignFallback;
import com.heima.model.behavior.pojos.ApBehaviorEntry;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "leadnews-behavior",fallbackFactory = BehaviorFeignFallback.class)
public interface BehaviorFeign {
    @GetMapping("/api/v1/behavior_entry/one")
    public ResponseResult<ApBehaviorEntry> findByUserIdOrEquipmentId
            (@RequestParam(value = "userId",required = false) Integer userId,
             @RequestParam(value = "equipmentId",required = false) Integer equipmentId);
}
